﻿//* Copyright(C) 2005-2012, all rights reserved.
//*
//* The following code is copyrighted and contains proprietary information
/* and trade secrets of Foxit Software Inc.      
**************************************************************************
*/

/**
    页面事件接口类
*/



define(function (require, exports, module) {
    require('./Event.js');
    var Interface = require('../Interface');
    //接口列表
    var PageEventInterface = new Interface('IReader_PageEventHandler', ['OnPageVisible', 'OnPageShowComplete', 'OnPageInvisible']);

    /**
     * @description Interface of the page event handler.
     * @class Interface of the page event handler.
     */
    FXREADER.Event.IReader_PageEventHandler = function () {

    };

    FXREADER.Event.IReader_PageEventHandler.prototype =
    {
    	/**
    	  * @description trigger when user scrolls and the page is visible.
    	  * @param {FXREADER.PDFView.CPDF_PageView} pPageView the object of current page view.
    	  * @param {Number} contentPanelWidth the width of the visible area(doc view).
    	  * @param {Number} contentPaneHeight the height of the visible area(doc view).
    	  * @param {Object} contentPanelOffset the offset to view port.
    	*/
        OnPageVisible: function (pPageView, contentPanelWidth, contentPaneHeight, contentPanelOffset) { },
        /**
         * @description trigger when the image of the page has been display.
         * @param {FXREADER.PDFView.CPDF_PageView} pPageView the object of page view.
         */
        OnPageShowComplete: function (pPageView) { },
        /**
         * @description trigger when the page becomes invisible.
         * @param {FXREADER.PDFView.CPDF_PageView} pPageView the object of page view.
         */
        OnPageInvisible: function (pPageView) { }
    };

    FXREADER.Event.IReader_PageEventHandler.EnsureInterface = function (subclass) { //确保派生类实现相应接口
        Interface.ensureImplements(subclass, PageEventInterface);
    };

    return FXREADER.Event.IReader_PageEventHandler;
});